package Book;

public class BookList {
    private Book[] books=new Book[10];//将每本书放入该数组中；
    private int usedsize;

    public BookList() {
        this.books[0] = new Book("三国演义","罗贯中","小说",35);
        this.books[1]=new Book("西游记","吴承恩","小说",40);
        this.books[2]=new Book("红楼梦","曹雪芹","小说",29);
        this.usedsize=3;

    }

    public Book getBooks(int pos) {
        return books[pos];
    }

    public void setBooks(int pos, Book book) {
        this.books[pos]= book;
    }

    public int getUsedsize() {
        return usedsize;
    }
  public Book[] getBooks(){
        return books;
  }
    public void setUsedsize(int usedsize) {
        this.usedsize = usedsize;
    }
}
